Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(server): support selfhost licenses #8947

Open
wants to merge 1 commit into
base: canary
Choose a base branch
from
Open

Conversation

forehalo
Copy link
Member

No description provided.

Copy link

graphite-app bot commented Nov 27, 2024

Your org has enabled the Graphite merge queue for merging into canary

Add the label “merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

Copy link
Member Author

forehalo commented Nov 27, 2024


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link

codecov bot commented Nov 27, 2024

Codecov Report

Attention: Patch coverage is 33.28313% with 886 lines in your changes missing coverage. Please review.

Project coverage is 52.50%. Comparing base (c0ed74d) to head (fe32240).

Files with missing lines Patch % Lines
...ages/backend/server/src/plugins/license/service.ts 22.25% 241 Missing ⚠️
...end/server/src/plugins/payment/manager/selfhost.ts 27.70% 167 Missing ⚠️
...d/server/src/plugins/payment/license/controller.ts 28.57% 165 Missing ⚠️
...ages/backend/server/src/plugins/payment/service.ts 16.77% 129 Missing ⚠️
...ges/backend/server/src/plugins/license/resolver.ts 44.21% 53 Missing ⚠️
...ckages/backend/server/src/plugins/payment/quota.ts 23.18% 53 Missing ⚠️
...ges/backend/server/src/plugins/payment/resolver.ts 33.33% 22 Missing ⚠️
packages/backend/server/src/base/helpers/url.ts 11.11% 16 Missing ⚠️
...ckages/backend/server/src/base/error/errors.gen.ts 76.27% 14 Missing ⚠️
...ckend/server/src/plugins/payment/manager/common.ts 31.57% 13 Missing ⚠️
... and 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##           canary    #8947      +/-   ##
==========================================
- Coverage   52.95%   52.50%   -0.46%     
==========================================
  Files        2167     2172       +5     
  Lines       97446    98654    +1208     
  Branches    16631    16620      -11     
==========================================
+ Hits        51606    51795     +189     
- Misses      44445    45447    +1002     
- Partials     1395     1412      +17     
Flag Coverage Δ
server-test 76.27% <33.28%> (-2.41%) ⬇️
unittest 32.37% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@forehalo forehalo force-pushed the 61/team-workspace-subscription branch 2 times, most recently from 35b17aa to c56895a Compare December 2, 2024 08:04
@forehalo forehalo force-pushed the 61/team-workspace-subscription branch from c56895a to 82be3b9 Compare December 2, 2024 13:10
@darkskygit darkskygit force-pushed the 61/team-workspace-subscription branch from 9777df8 to c18107e Compare December 5, 2024 08:15
@forehalo forehalo changed the base branch from 61/team-workspace-subscription to graphite-base/8947 December 5, 2024 08:31
@forehalo forehalo changed the base branch from graphite-base/8947 to canary December 10, 2024 07:29
@forehalo forehalo marked this pull request as ready for review December 10, 2024 07:34
@graphite-app graphite-app bot requested review from CatsJuice, EYHN, JimmFly, pengx17, darkskygit and Brooooooklyn and removed request for darkskygit December 10, 2024 07:34
@forehalo forehalo force-pushed the 61/selfhost-team branch 7 times, most recently from 959abb4 to 957a785 Compare December 16, 2024 01:57
}

const res = await this.fetch<License>(
`/api/team/licenses/${license}/activate`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/api/team/licenses/ base can move to fetch

Comment on lines 93 to 96
// TODO(@forehalo): we need a way to get the default quota for workspace
if (count > 10) {
throw new WorkspaceMembersExceedLimitToDowngrade({ limit: 10 });
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QuotaService.getQuota()

@forehalo forehalo force-pushed the 61/selfhost-team branch 2 times, most recently from 39c4981 to 0284dbc Compare January 7, 2025 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants